<#include "user_manager_header.ftl">

<div class="panel panel-default">
	<div class="panel-heading">
		<h3 class="panel-title">开放平台</h3>
	</div>
	<div class="panel-body">
		<ul class="nav nav-tabs">
			<li id ="li1"><a href="oilcompany_list">管理加油企业</a></li>
			<li id ="li2" class="active"><a href="oilcompany_update">增加加油企业</a></li>
		</ul>
		<div>
			<p></p>
		</div>

		<div class="panel panel-default">
			<div class="panel-body">

				<form class="form-horizontal" role="form" id="form" method="post"
					action="oilcompany_update_exe">
					<div class="form-group">
						<label for="oilcomapnyname" class="col-sm-2 control-label">加油企业名称</label>
						<div class="col-sm-6">
							<input type="hidden" class="form-control"
								value="${(oilcompany.oilComapnyCode)?if_exists}"
								name="oilcomapnycode" id="oilcomapnycode" /> 
								<input type="hidden" class="form-control" value="${readonly?if_exists}"
								name="readonly" id="readonly" /> <input type="text"
								class="form-control"
								value="${(oilcompany.oilCompanyName)?if_exists}"
								name="oilcomapnyname" id="oilcomapnyname" placeholder="加油企业名称"
								required autofocus />
						</div>
					</div>

					<div class="form-group">
						<label for="oilcomapnyname" class="col-sm-2 control-label">加油企业地址</label>
						<div class="col-sm-6">
							<input type="text" class="form-control"
								value="${(oilcompany.oilCompanyAddressDetail)?if_exists}"
								name="oilcompanyaddressdetail" id="oilcompanyaddressdetail"
								placeholder="加油企业地址" required />
						</div>
					</div>

					<div class="form-group">
						<label for="oilcomapnyname" class="col-sm-2 control-label">加油企业联系人</label>
						<div class="col-sm-6">
							<input type="text" class="form-control"
								value="${(oilcompany.linkManName)?if_exists}" name="linkmanname"
								id="linkmanname" placeholder="加油企业联系人" required />
						</div>
					</div>

					<div class="form-group">
						<label for="linkmanphone" class="col-sm-2 control-label">加油企业联系人电话</label>
						<div class="col-sm-6">
							<input type="text" class="form-control"
								value="${(oilcompany.linkManPhone)?if_exists}"
								name="linkmanphone" id="linkmanphone" placeholder="加油企业联系人电话"
								required />
						</div>
					</div>

					<div class="form-group">
						<div class="col-sm-offset-2 col-sm-10">
							<button type="submit" class="btn btn-default" id="button"
								${(oilcompany.oilComapnyCode)?if_exists}>提交</button>
						</div>
					</div>
				</form>

			</div>
			<!--/panel-body-->

		</div>
		<div class="panel-footer"></div>
	</div>

	<blockquote>
		<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
			Integer posuere erat a ante.</p>
		<footer>Luther</footer>
	</blockquote>

	<#include "user_manager_footer.ftl">

	<script type="text/javascript">
		$().ready(function() {

			if (document.getElementById("readonly").value == "UPDATE") {
				document.getElementById("linkmanphone").readOnly = true;
			}

			$("#button").click(function() {

			});

		});
	</script>